package com.ruan.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruan.mapper.PositionMapper;
import com.ruan.pojo.Position;
import com.ruan.service.PositionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service//交由spring容器进行管理//  mybatis-plus提供的规范，继承父类，实现父接口
public class PositionServiceImpl extends ServiceImpl<PositionMapper, Position> implements PositionService {

    @Autowired
    PositionMapper positionMapper;
    /**
     * 获取职位列表
     * @return
     */
    @Override
    public List<Position> getPosition() {
        LambdaQueryWrapper<Position> queryWrapper = new LambdaQueryWrapper<>();
        List<Position> positionList = positionMapper.selectList(queryWrapper);
        return positionList;
    }
}
